<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Exposure_orderModel
 *
 * @author wml
 */

namespace Admin\Model;

use Think\Model;

class NewsModel extends Model {
   
   public function getNewsLIst($where,$order,$p,$pagesize){
    
        if(!$pagesize){

            $comList=getPages(M('news'),$where,$order);
            
        }else{
            
            $start =$p!=0?($p-1)*$pagesize:$p*$pagesize; 
            $comList=M('news')->where($where)->field('id,news_name,news_price')->limit($start,$pagesize)->order($order)->select();
           
        }
         return $comList;
    
   }

    


 

 

     

}

?>
